<%@ page contentType="text/html;charset=UTF-8" language="java"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>风尚图库，时尚奢侈品美图在线欣赏!风尚中国 中国风尚</title>
    <meta name="keywords"
          content="卡地亚,阿玛尼,Gucci,纪梵希,梵克雅宝,Dior,爱马仕,Channel,burbery,PRADA,奢华,名流,符号,派对,明星,街拍,大牌,秀场,模特,奢侈品,天价,拍卖,豪宅,艺术,游艇,飞机,酒店,红酒"/>
    <meta name="description"
          content="风尚图库是时尚奢侈品美图在线欣赏的平台,包括时尚品牌、服装品牌、化妆品品牌、珠宝品牌、腕表品牌、游艇品牌、名车品牌、私人飞机品牌等奢侈品品牌高清图片以及名人、明星、模特高清写真图片大全。"/>
    <%String basePath = request.getContextPath();%>
</head>
<link rel="stylesheet" type="text/css" href="<%=basePath%>/styles/gallery/common.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>/styles/gallery/gallery.css">
<link rel="stylesheet" type="text/css" href="<%=basePath%>/js/slides/css/global.css">
<script type="text/javascript" src="<%=basePath%>/js/easyui/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="<%=basePath%>/js/slides/js/slides.min.jquery.js"></script>
<script type="text/javascript" src="<%=basePath%>/js/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript">	
  var isLoadingGalleries = false;  
  
  var floatDivTop;
  $(function() {
	floatDivTop = $('#float_div').offset().top;	
	$('.caption').show();
    $('#slides').slides({
        preload: true,
        preloadImage: 'img/loading.gif',
        play: 5000,
        pause: 2500,
        hoverPause: true,
        animationStart: function(current){
            $('.caption').animate({
                bottom:-35
            },100);
            if (window.console && console.log) {
                console.log('animationStart on slide: ', current);
            };
        },
        animationComplete: function(current){
            $('.caption').animate({
                bottom:0
            },200);
            if (window.console && console.log) {
                console.log('animationComplete on slide: ', current);
            };
        },
        slidesLoaded: function() {
            $('.caption').animate({
                bottom:0
            },200);
        }
    });
    registerMouseAction();
    $("#pageNum").attr("value", "1");
    $(window).bind("scroll", function(){ 
    	floatHeight = $('#float_div').height();
    	scrollTop = $(document).scrollTop();
    	if(scrollTop > floatDivTop){
    		if((scrollTop + floatHeight - floatDivTop) <  getLongestDiv().height()){
    			$('#float_div').css("top", scrollTop - floatDivTop);
    		}
    	}else{
    		$('#float_div').css("top", 0);
    	}	  
    	var shortestDiv =  getShortestDiv(); 
    	var height = shortestDiv.height();
    	if(scrollTop > height - 150){
    		if(!isLoadingGalleries){
    			loadGalleryies();
    		}
    	}else{
    		isLoadingGalleries = false;  
    	}
      });
  });  

  function registerMouseAction(){
	  $(".col_album").bind("mouseover", function(){
	    	var height = $(this).height();
	        $(this).find("span").css('height', height);
	        $(this).find("span").css('left', 0);
	  });
	  $(".col_album").bind("mouseout", function(){
	        $(this).find("span").css('left', -220);
	  });
  }
  function loadGalleryies(){
	  isLoadingGalleries = true;
	  $("#loadInfo").css("display", "block");
	  var pageNum = $("#pageNum").val();
	  $("#pageNum").val(parseInt(pageNum) + 1);
	  $("#pageInfoForm").form('submit', {
		  url: "/gallery/find_galleries.action",
          success:function(data) {
        	  var dataObj = eval("(" + data + ")");
        	  for(var i=0;i<dataObj.length;i++){   
        		  var gallery = dataObj[i];
        		  var shortestDiv =  getShortestDiv();      		  
        		  var content = '<div class="col_album"><a href="/g-'+gallery.id+'.html"><img width="220" border="0" alt="'+ gallery.title + '" src="../gallery/'+ gallery.id + '/cover/' + getGalleryCoverType() + '/'+ gallery.cover + '"><span class="col_album_titile">'+gallery.title+'</span></a></div>';
        		  shortestDiv.append(content);
        	  }
        	  registerMouseAction();
        	  $("#loadInfo").css("display", "none");
          }
      }); 
  }
  function getGalleryCoverType(){
	  if(Math.random() > 0.2){
		  return "lognitudinal";
	  }else{
		  return "transverse";
	  }
  }
  
  function getShortestDiv(){
	  var col1Length = $('#col1').height();
	  var col2Length = $('#col2').height();
	  var col3Length = $('#col3').height();
	  var colShortest = "col1";
	  var shortest = col1Length;
	  if(col2Length < shortest){
		  shortest = col2Length;
		  colShortest = "col2";
	  }
	  if(col3Length < shortest){
		  shortest = col3Length;
		  colShortest = "col3";
	  }
	  return $("#" + colShortest);
  }
  
  function getLongestDiv(){
	  var col1Length = $('#col1').height();
	  var col2Length = $('#col2').height();
	  var col3Length = $('#col3').height();
	  var colLongest = "col1";
	  var shortest = col1Length;
	  if(col2Length > shortest){
		  shortest = col2Length;
		  colLongest = "col2";
	  }
	  if(col3Length > shortest){
		  shortest = col3Length;
		  colLongest = "col3";
	  }
	  return $("#" + colLongest);
  }
  
</script>
<body>
<div id="header">
	<div id="header_1">
	<div id="log"><a href="http://www.fengsung.com"><img style="border: 0px;" src="/images/logo_luxury.gif" /></a></div>
	<s:include value="/menu1.jsp"></s:include>
	</div>
	<div id="header_2">
		<s:include value="/ad/gallery/ad1.html"></s:include>
	</div>
</div>
<s:include value="/menu2.jsp"></s:include>
<div id="main">
<div id="banner">
    <div id="container">
        <div id="slides">
            <div class="slides_container" style="height:402px;width:1002px;">
            	<div class="slide">
                	<a href="http://pic.fengsung.com/g-1386771776929.html" target="_blank">
                	<img alt="高圆圆穿Guy Laroche宝石蓝长裙璀璨夺目" src='/ad/gallery/slide4.jpg' width="1000" height="400">
                	</a>
                	<div class="caption" style="display:none">
                    	高圆圆穿Guy Laroche宝石蓝长裙璀璨夺目
                	</div>
                </div>
            	<div class="slide">
                	<a href="http://pic.fengsung.com/g-1384071577470.html" target="_blank">
                	<img alt="Mercedes-Benz（奔驰）GLA Edition 1" src='/ad/gallery/slide3.jpg' width="1000" height="400">
                	</a>
                	<div class="caption" style="display:none">
                    	Mercedes-Benz（奔驰）GLA Edition 1
                	</div>
                </div>
                <div class="slide">
                	<a href="http://pic.fengsung.com/g-1381488959194.html" target="_blank">
                	<img alt="Alexander McQueen 2014春夏流行发布" src='/ad/gallery/slide1.jpg' width="1000" height="400">
                	</a>
                	<div class="caption" style="display:none">
                    	Alexander McQueen 2014春夏流行发布
                	</div>
                </div>
                
                <div class="slide">
                	<a href="http://pic.fengsung.com/g-1381383310410.html" target="_blank">
                	<img alt="Vionnet 2014春夏流行发布" src='/ad/gallery/slide2.jpg' width="1000" height="400">
                	</a>
                	<div class="caption" style="display:none">
                    	Vionnet 2014春夏流行发布
                	</div>
                </div>
                
            </div>
        </div>
    </div>
</div>
<div id="gallery_column">
	<s:iterator value="columns" status="index">
	<%String glleryCoverType = "LOGNITUDINAL_COVER"; %>
	<s:if test="#index.index%2 == 1">
	<%glleryCoverType = "TRANSVERSE_COVER"; %>
	</s:if>
	<div><a href="/g_c-<s:property value="id"/>_t-<%=glleryCoverType%>.html"><s:property value="name"/></a></div>
	</s:iterator>
	<div style="width:200px;border-top: 1px solid #FF0000;"></div>
</div>

<form id="pageInfoForm" method="post" name="pageInfoForm" >
	<input type="hidden" id="pageNum" name="pageNum" value="1">
</form>
<div id="col1" class="col">
	<s:iterator value="albums" status="index">
	<s:if test="#index.index%3 == 0">
	<div class="col_album">	
		<%String glleryCoverType=Math.random()>0.5?"lognitudinal":"transverse";%>
		<a href="/g-<s:property value ='id'/>.html" >
		<img width="220" border="0" alt="<s:property value="title"/>"
	                                                         src="../gallery/<s:property value ="id"/>/cover/<%=glleryCoverType%>/<s:property value ="cover"/>">
		<span class="col_album_titile">
			<s:property value="title"/>
		</span>
		</a>
	</div>
	</s:if>
	</s:iterator>
</div>
<div id="col2" class="col">
	<s:iterator value="albums" status="index">
	<s:if test="#index.index%3 == 1">
	<div class="col_album">	
		<%String glleryCoverType=Math.random()>0.5?"lognitudinal":"transverse";%>	
		<a href="/g-<s:property value ='id'/>.html" >
		<img width="220" border="0" alt="<s:property value="title"/>"
	                                                         src="../gallery/<s:property value ="id"/>/cover/<%=glleryCoverType%>/<s:property value ="cover"/>">	
		<span class="col_album_titile">
			<s:property value="title"/>
		</span>
		</a>
	</div>
	</s:if>
	</s:iterator>
</div>
<div id="col3" class="col">
	<s:iterator value="albums" status="index">
	<s:if test="#index.index%3 == 2">
	<div class="col_album">	
		<%String glleryCoverType=Math.random()>0.5?"lognitudinal":"transverse";%>
		<a href="/g-<s:property value ='id'/>.html" >
		<img width="220" border="0" alt="<s:property value="title"/>"
	                                                         src="../gallery/<s:property value ="id"/>/cover/<%=glleryCoverType%>/<s:property value ="cover"/>">
		<span class="col_album_titile">
			<s:property value="title"/>
		</span>
		</a>
	</div>
	</s:if>
	</s:iterator>
</div>
<div id="float_div">
	<div id="recommend">
		<div id="float_div_title">精彩推荐</div>
		<s:iterator value="recommendAlbums" status="index">
		<div id="float_div_content">
			<a href="/g-<s:property value ='id'/>.html">
			<img style="border:none;" src="../images/dot.gif">&nbsp;&nbsp;<s:property value="viceTitle"/>
			</a>
		</div>
		</s:iterator>
	</div>
	<div id="ad_300x250_container" style="width: 300px;height:260px;margin-top:20px;">
        <iframe frameBorder="0" scrolling="no" width="100%" height="260px"
                marginwidth="0" allowtransparency="true" marginheight="0" style="border: 0 none;"
                src="/ad/page/ad1.html"></iframe>
    </div>
</div>
<div id="load_info">正在努力加载相册...</div>
<s:include value="/ad/brand/ad5.html"></s:include>
<s:include value="/footer.jsp"></s:include>
</div>
</body>
</html>